home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000016_bounce-amos-li…net@onelist.com_Tue Sep 1 18:27:04 1998.msg < prev    next >
Text File  |  1998-10-01  |  7KB  |  264 lines

  1. >From bounce-amos-list--869-mcox=access.digex.net@onelist.com  Tue Sep  1 18:27:04 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.135.253])
  3.     by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id SAA07753
  4.     for <mcox@access.digex.net>; Tue, 1 Sep 1998 18:27:03 -0400 (EDT)
  5. Received: (qmail 13229 invoked by alias); 1 Sep 1998 22:24:30 -0000
  6. Received: (qmail 13197 invoked from network); 1 Sep 1998 22:24:28 -0000
  7. Received: from unknown (HELO mail.enterprise.net) (194.72.192.18) by pop.onelist.com with SMTP; 1 Sep 1998 22:24:28 -0000
  8. Received: from enterprise.net (root@ppp-169.telinco.com [195.188.107.169]) by mail.enterprise.net (8.8.5/8.8.5) with SMTP id XAA26587 for <amos-list@onelist.com>; Tue, 1 Sep 1998 23:26:51 +0100 (GMT/BST)
  9. From: Andrew Crowe <andrewcrowe@enterprise.net>
  10. To: amos-list@onelist.com
  11. Date: Tue, 01 Sep 1998 23:20:51 +0000
  12. Message-ID: <yam7548.2577.1197282024@mail.enterprise.net>
  13. In-Reply-To: <yam7547.1738.4731072@mail.flashback.net>
  14. X-Mailer: YAM 2.0 Preview5 - Amiga Mailer by Marcel Beck - http://www.yam.ch
  15. Organization: Manta Soft
  16. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  17. Delivered-To: mailing list amos-list@onelist.com
  18. Precedence: bulk
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-type: multipart/mixed; boundary="BOUNDARY.1197282024.2"
  22. Subject: [amos-list] Re: snow that looks like the blitzblank snow !
  23. Status: O
  24. X-Status: 
  25.  
  26. From: Andrew Crowe <andrewcrowe@enterprise.net>
  27.  
  28. Warning: This is a message in MIME format. Your mail reader does not
  29. support MIME. Some parts of this message will be readable as plain text.
  30. To see the rest, you will need to upgrade your mail reader.
  31.  
  32.  
  33. --BOUNDARY.1197282024.2
  34. Content-Type: text/plain
  35.  
  36. Hi Everybody,
  37.  
  38. > From: Hakan Venderlof <grok@flashback.net>
  39.  
  40. > Hm has someone got a code for a 'snowfall'
  41. > preferably where snow slowly builds up in bottom of screen...?
  42.  
  43. I've dug this one up from my 'programs that never got finnished' and,
  44. er, finnished it. I had to do a complex work-around to stop the snow
  45. making huge spikes going up the screen and its not very fast, but when
  46. using AmosTurbo commands + compiled I get about 20fps with 200 flakes on
  47. my 040/25mhz :) .
  48.  
  49.     PS. I've left the turbo commands in there, change F Plot to Plot and
  50. F Point to Point if you don't have AmosTurbo.
  51.  
  52. Enjoy
  53.  
  54. -- 
  55.                                 <PRE>
  56.   - --------------------- Quote of the day: ---------------------- -
  57. Everything should be made as simple as possible, but not simpler.
  58. -- Albert Einstein
  59.  
  60. +--------------------------------------------------------------------+
  61. |                                                ,aNNN               |
  62. |  a&   NL                 ,a,                 ,gNNNNN               |
  63. |  @7L d 0   ,a,,aw ,a,,  JN Q,  ,a,,aw,,,,  ,gNM"`NN'               |
  64. | J  9w"  K N" "" NN"""""WF  ~3&N" "" N   ""^N"    NF                |
  65. | N , " , Nd ,@M, NN JML @ML d@N ,@4, N       ',  JK                 |
  66. |d JMc dN  N  NN  NN 0 1 1J1 0 0  NN  N         L,K                  |
  67. |N,N 0w' Na@h,,a,,NQ,0 &J1J&,0  \,,a,,N         JF                   |
  68. | ""  "  ~"  ""~"""~"" ""  """  t""~"""        j"1                   |
  69. |                               F             JgmJ        ,gm        |
  70. |                               F            N"  N  ,,    F ,N gNN   |
  71. |      Andrew Crowe             Q          jJF  mP p""9w,NL NwmP 0mw |
  72. |      ~~~~~~~~~~~~             ]         / I  0 F@ am, Nw  ,0&   ,N |
  73. |       Manta Soft             ,F\      a' ,N  Nf L E 0 0ML N""N 0"  |
  74. |       ~~~~~~~~~~            ,N  \,  ,P N@"  JF  & `@" NJL N  N 0   |
  75. |                            ,N     ad"   \wam"   `Nx,aN JNmN  NmN   |
  76. |                            NN ,,gN" ""PP"                          |
  77. |                           dNNNNN"                                  |
  78. |                           NNN@"      Web Designing and          // |
  79. | Visit our Web Site:       ""               Amiga Programming \\//  |
  80. |                                                                    |
  81. |     HTTP://www.geocities.com/Eureka/Gold/1713/                     |
  82. |                                                                    |
  83. +----------------------------+      This signature was created using |
  84. | andrewcrowe@enterprise.net |         AsciiArt Studio               |
  85. +----------------------------+---------------------------------------+
  86.                                 </PRE>
  87.  
  88. --BOUNDARY.1197282024.2
  89. Content-Type: text/plain; name="Snow.Asc"
  90. Content-Disposition: attachment; filename="Snow.Asc"
  91.  
  92. '                           *
  93. '           *
  94. ' *                 *
  95. '  SNOW, by AndrewCrowe@enterprise.net   * 
  96. '    *              *
  97. '                            * 
  98. '
  99.  
  100. NOF=200
  101. '  Number of flakes, less=faster 
  102.  
  103. Screen Open 0,320,200,8,Lowres
  104. Flash Off 
  105. '
  106. ' Keep the colours down for speed
  107. '
  108.  
  109.  
  110. MY=Screen Height
  111. MX=Screen Width
  112.  
  113.  
  114.  
  115. Dim SFLAKES#(NOF,1),SFLAKES(NOF,1)
  116.  
  117. 'Use floating point for accuracy.
  118.  
  119. 'SFLAKES#(NOF,0) - X 
  120. 'SFLAKES#(NOF,1) - Y 
  121. 'SFLAKES(NOF,0) - angle for wind offset  
  122. 'Sflakes(NOF,1) - colour   
  123.  
  124.  
  125. For A=0 To NOF
  126.    
  127.    SFLAKES#(A,0)=Rnd(MX)
  128.    SFLAKES#(A,1)=Rnd(MY)
  129.    SFLAKES(A,0)=Rnd(90)
  130.    ' Dont want the angle dif. to be too big 
  131.    
  132.    SFLAKES(A,1)=Rnd(6)
  133.    ' Colour 7 is snow on ground 
  134.    
  135. Next 
  136.  
  137.  
  138. Colour 1,$333
  139. Colour 2,$555
  140. Colour 3,$777
  141. Colour 4,$999
  142. Colour 5,$BBB
  143. Colour 6,$DDD
  144. Colour 7,$FFF
  145.  
  146.  
  147.  
  148. Degree 
  149.  
  150. Cls 0
  151.  
  152. 'Double Buffer 
  153. 'Autoback 0
  154.  
  155. NO=0
  156.  
  157. Do 
  158.    
  159.    RNO=Rnd(3) : Rem wind Angle changes randomly  
  160.    
  161.    
  162.    
  163.    For A=0 To NOF
  164.       Gosub CALC
  165.    Next 
  166.    
  167.    'Screen Swap 
  168.    Wait Vbl 
  169.    
  170. Loop 
  171.  
  172. CALC:
  173.  
  174. OX=SFLAKES#(A,0)
  175. OY=SFLAKES#(A,1)
  176. 'buffer pos. so that you can erase old flake 
  177.  
  178.  
  179. F=SFLAKES(A,1)
  180. FF=F/4+1
  181.  
  182.  
  183. SFLAKES#(A,1)=SFLAKES#(A,1)+FF
  184.  
  185. XAD#=Sin(SFLAKES(A,0))*FF
  186. '  Add wind
  187.  
  188. SFLAKES#(A,0)=SFLAKES#(A,0)+XAD#
  189.  
  190. If SFLAKES#(A,0)<0 Then SFLAKES#(A,0)=SFLAKES#(A,0)+MX
  191. If SFLAKES#(A,0)>MX Then SFLAKES#(A,0)=SFLAKES#(A,0)-MX
  192.  
  193.  
  194. SFLAKES(A,0)=SFLAKES(A,0)+RNO
  195. ' Change wind
  196. If SFLAKES(A,0)>360
  197.    SFLAKES(A,0)=0
  198. End If 
  199.  
  200. X=SFLAKES#(A,0)
  201. Y=SFLAKES#(A,1)
  202. P=F Point(X,Y)
  203.  
  204.  
  205.  
  206.  
  207. If P=-1 or P=7
  208.    ' The snow has hit the ground
  209.    
  210.    'Y=Y-1 : Goto FIN
  211.    '  Enable this line to do it much faster, but not as good ;( 
  212.    
  213.    
  214.    '''''''''''''''''''''''''''''''''''''''''''''''' 
  215.    DDS:
  216.    Y=MY
  217.    Repeat 
  218.       Y=Y-1
  219.       P=F Point(X,Y)
  220.    Until P=0 or P=-1
  221.    
  222.    If P=0
  223.       P1=Point(X-1,Y+1)
  224.       P2=Point(X+1,Y+1)
  225.       If P1=-1 : P1=7 : End If 
  226.       If P2=-1 : P2=7 : End If 
  227.       If P2=0 and P1=0
  228.          If Rnd(1)=0
  229.             P1=7
  230.          Else 
  231.             P2=7
  232.          End If 
  233.       End If 
  234.       If P1=7 and P2=0
  235.          X=X+1
  236.          Goto DDS
  237.       Else If P2=7 and P1=0
  238.          X=X-1
  239.          Goto DDS
  240.       End If 
  241.    End If 
  242.    '''''''''''''''''''''''''''''''''''''''''''''
  243.    ' This lot checks where its hit and piles it 
  244.    ' nicely ;) no strange spikes when you use this
  245.    
  246.    
  247.    FIN:
  248.    
  249.    F Plot OX,OY,0
  250.    F Plot X,Y,7
  251.    SFLAKES#(A,0)=Rnd(MX)
  252.    SFLAKES#(A,1)=0
  253. Else 
  254.    F Plot X,Y,SFLAKES(A,1)
  255.    F Plot OX,OY,0
  256.    ' Update snow
  257. End If 
  258.  
  259. Return 
  260.  
  261.  
  262. --BOUNDARY.1197282024.2--
  263.  
  264.